For read-only computed properties and subscript declarations, the get
keyword and its braces are optional, and should be omitted for
the sake of brevity.
Noncompliant code example
struct Magic {
var number:Int {
get { // Noncompliant
return 42
}
}
}
Compliant solution
struct Magic {
var number:Int {
return 42
}
}